package com.bxait.toymail.search.constant;

/**
 * @author Chen
 * @description: es常量设置
 * @ClassName EsConstant
 * @create 2023-04-14 21:13
 * @Version 1.0
 */
public class EsConstant {
    // =======================面包屑跳转的相关参数============================
    // es检索服务最终要跳转的地址
    public static final String URL = "http://search.toymail.com/list.html?";
    public static final String BRAND_NAME = "品牌";

    // =======================sku数据在es中的相关属性名称============================
    // sku数据在es中的索引
    public static final String PRODUCT_INDEX = "toymail_product_new";
    // 每页显示的数据
    public static final Integer PRODUCT_PAGE_SIZE = 16;
    // 商品属性在es中保存的nested的路径
    public static final String NESTED_ATTR_PATH = "attrs";
    public static final String NESTED_ATTR_ID = "attrs.attrId";
    public static final String NESTED_ATTR_NAME = "attrs.attrName";
    public static final String NESTED_ATTR_VALUES = "attrs.attrValue";

    // =======================商品在es中保存的属性名称============================
    // 商品标题
    public static final String SKU_TITLE = "skuTitle";
    // 商品分类id
    public static final String CATALOG_ID = "catalogId";
    // 商品品牌id
    public static final String BRAND_ID = "brandId";
    // 商品是否有货
    public static final String HAS_STOCK = "hasStock";
    // 商品价格
    public static final String SKU_PRICE = "skuPrice";


    // =======================es聚合的分析的名称============================
    // 品牌聚合
    public static final String BRAND_AGG = "brand_agg";
    public static final Integer BRAND_AGG_SIZE = 50;
    // ======================品牌子聚合=============================
    // 品牌名称聚合
    public static final String BRAND_NAME_AGG = "brand_name_agg";
    public static final String BRAND_NAME_AGG_FIELD = "brandName";
    public static final Integer BRAND_NAME_AGG_SIZE = 1;
    // 品牌图片聚合
    public static final String BRAND_IMG_AGG = "brand_img_agg";
    public static final String BRAND_IMG_AGG_FIELD = "brandImg";
    public static final Integer BRAND_IMG_AGG_SIZE = 1;

    // 分类聚合
    public static final String CATALOG_AGG = "catalog_agg";
    public static final Integer CATALOG_AGG_SIZE = 20;
    // ======================分类子聚合=============================
    // 分类名称聚合
    public static final String CATALOG_NAME_AGG = "catalog_name_agg";
    public static final Integer CATALOG_NAME_AGG_SIZE = 1;
    public static final String CATALOG_NAME_AGG_FIELD = "catalogName";

    // 属性聚合
    public static final String ATTR_AGG = "attr_agg";
    // 属性id聚合
    public static final String ATTR_ID_AGG = "attr_id_agg";
    // ======================属性子聚合=============================
    // 属性名称聚合
    public static final String ATTR_NAME_AGG = "attr_name_agg";
    public static final Integer ATTR_NAME_AGG_SIZE = 1;
    // 属性值聚合
    public static final String ATTR_VALUE_AGG = "attr_value_agg";
    public static final Integer ATTR_VALUE_AGG_SIZE = 50;

}
